<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 3. 导入bootstrap的js文件 -->

    <link href="${pageContext.request.contextPath}//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
          rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <%--<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->--%>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/echarts.min.js"></script>
    <title>Title</title>
    <style>
        td, th {
            text-align: center;
        }

        #form tr:hover {
            background-color: #f5f5f5;
        }

        *, html, body {
            margin:0;
            background-color: rgb(246, 246, 246);
        }

        .logintext {
            height: 30px;
            clear: left;
            clear: right;
            font-size: 14px;
            float: right;
        }

    </style>
    <script>
        function delectBlogBiaoQian(id) {
            // alert(id);
            //用户安全提示
            if (confirm("您确定要删除吗？")) {
                //访问路径
                location.href = "${pageContext.request.contextPath}/biaoqian/delete?id=" + id;
            }
        }

    </script>
</head>
<body>
<div>
    <h3 style="text-align: center">甘特图展示</h3>
    <marquee behavior="" direction="">
        <h5 style="color: red">温馨提示:请先输入机器和产品各项参数及相应的加工工序和时间后才能绘制加工甘特图</h5>
    </marquee>

    <hr style="height: 1px; background: black">

    <p class="pull-left">经过本系统综合分析,计算得出生产时间约为: <span style="color: orangered"> ${sessionScope.goodNumber}</span> 分钟</p>
    <hr>
    <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
    <div id="main" style="width: 1000px;height:250px;"></div>
    <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));

        // 指定图表的配置项和数据
        var option = {
            title: {
                text: '工件加工进度甘特图表:',
                left: 10
            },
            legend: {
                data: ['计划实施时间1', '实际实施时间1'],
                right: 20
            },
            grid: {
                containLabel: true,
                left: 20
            },
            xAxis: {
                type: 'value',
                splitNumber:5

            },

            yAxis: {
                data: ['工件一', '工件二', '工件三']
            },
            tooltip: {},
            series: [{
                name: '机器1',
                type: 'bar',
                stack: 'test',
                itemStyle: {
                    normal: {
                        color: 'rgba(0,0,0,0)'
                    }
                },
                data: [
                    2, 0, 0
                ]
            },
                {
                    name: '设备1',
                    type: 'bar',
                    stack: 'test',
                    data: [
                        3, 2, 0
                    ]
                },
                {
                    name: '设备2',
                    type: 'bar',
                    stack: 'test',
                    itemStyle: {
                        normal: {
                            color: 'rgba(0,0,0,0)'
                        }
                    },
                    data: [
                        0, 0, 0
                    ]
                },
                {
                    name: '设备2',
                    type: 'bar',
                    stack: 'test',
                    data: [
                        2, 0, 4
                    ]
                },
                {
                    name: '设备3',
                    type: 'bar',
                    stack: 'test',
                    itemStyle: {
                        normal: {
                            color: 'rgba(0,0,0,0)'
                        }
                    },
                    data: [
                        0, 0, 0
                    ]
                },
                {
                    name: '设备3',
                    type: 'bar',
                    stack: 'test',
                    data: [
                        2, 1, 3
                    ]
                },
                {
                    name: '设备2',
                    type: 'bar',
                    stack: 'test',
                    itemStyle: {
                        normal: {
                            color: 'rgba(0,0,0,0)'
                        }
                    },
                    data: [
                        0, 4, 0
                    ]
                },
                {
                    name: '设备2',
                    type: 'bar',
                    stack: 'test',
                    data: [
                        0, 4, 0
                    ]
                }
            ]
        };




        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
    </script>
    <hr style="height: 1px; background: black">
    <div id="main1" style="width: 1000px;height:250px;"></div>
    <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main1'));

        // 指定图表的配置项和数据
        var option = {
            title: {
                text: '机器能力加工甘特图表:',
                left: 10
            },
            legend: {
                data: ['计划实施时间1', '实际实施时间1'],
                right: 20
            },
            grid: {
                containLabel: true,
                left: 20
            },
            xAxis: {
                type: 'value',
                splitNumber:5

            },

            yAxis: {
                data: ['设备一', '设备二', '设备三']
            },
            tooltip: {},
            series: [

                {
                    name: '工件3',
                    type: 'bar',
                    stack: 'test',
                    itemStyle: {
                        normal: {
                            color: 'rgba(0,0,0,0)'
                        }
                    },
                    data: [
                        0, 0, 0
                    ]
                },
                {
                    name: '工件3',
                    type: 'bar',
                    stack: 'test',
                    data: [
                        0, 4, 0
                    ]
                },

                {
                    name: '工件2',
                    type: 'bar',
                    stack: 'test',
                    itemStyle: {
                        normal: {
                            color: 'rgba(0,0,0,0)'
                        }
                    },
                    data: [
                        0, 0, 0
                    ]
                },
                {
                    name: '工件2',
                    type: 'bar',
                    stack: 'test',
                    data: [
                        2, 0, 0
                    ]
                },{
                    name: '工件1',
                    type: 'bar',
                    stack: 'test',
                    itemStyle: {
                        normal: {
                            color: 'rgba(0,0,0,0)'
                        }
                    },
                    data: [
                        0, 1, 0
                    ]
                },
                {
                    name: '工件1',
                    type: 'bar',
                    stack: 'test',
                    data: [
                        3, 2, 0
                    ]
                },
                {
                    name: '工件2',
                    type: 'bar',
                    stack: 'test',
                    itemStyle: {
                        normal: {
                            color: 'rgba(0,0,0,0)'
                        }
                    },
                    data: [
                        0, 0, 2
                    ]
                },
                {
                    name: '工件2',
                    type: 'bar',
                    stack: 'test',
                    data: [
                        0, 4, 1
                    ]
                },
                {
                    name: '工件3',
                    type: 'bar',
                    stack: 'test',
                    itemStyle: {
                        normal: {
                            color: 'rgba(0,0,0,0)'
                        }
                    },
                    data: [
                        0, 0, 1
                    ]
                },
                {
                    name: '工件3',
                    type: 'bar',
                    stack: 'test',
                    data: [
                        0, 0, 3
                    ]
                },
                {
                    name: '工件1',
                    type: 'bar',
                    stack: 'test',
                    itemStyle: {
                        normal: {
                            color: 'rgba(0,0,0,0)'
                        }
                    },
                    data: [
                        0, 0, 0
                    ]
                },
                {
                    name: '工件1',
                    type: 'bar',
                    stack: 'test',
                    data: [
                        0, 0, 2
                    ]
                }
            ]
        };




        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
    </script>
</div>
</body>
</html>
